<?php
if(!isset($_SESSION))
	session_start();
	$user=$_SESSION["user"];
?>
<?php include "connect.php"; include "function.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
<?php
	if(isset($_REQUEST["b"])||isset($_REQUEST["id"])||isset($_REQUEST["idl"])||isset($_REQUEST["idn"])||isset($_REQUEST["idm"]))
	{
		$b=$_REQUEST["b"];$id=$_REQUEST["id"];$idl=$_REQUEST["idl"];$idn=$_REQUEST["idn"];
		$idm=$_REQUEST["idm"];
		if($b=="gioithieu")
			echo ".::Giới thiệu - vietducco.com::.";		
		if($b=="lienhe")
			echo ".::Liên hệ - vietducco.com::.";		
		if($b=="huongdanmuahang")
			echo ".::Hướng dẫn mua hàng - vietducco.com::.";		
		if($b=="download-cataloge"){
			echo ".::Download Cataloge - vietducco.com::."; }
		if($b=="kd"){
			echo ".::Các Kiểu Đan - vietducco.com::."; }	
		if($b=="khtt"){
			echo ".::Khách hàng thân thiết - vietducco.com::."; }	
		if($b=="md"){
			echo ".::Mã màu dây - vietducco.com::."; }	
		if($b=="dk"){
			echo ".::Đăng ký thành viên - vietducco.com::."; }			
		if($b=="ttcn"){
			echo ".::Thông tin cá nhân - $user - vietducco.com::."; }	
		if($b=="change"){
			echo ".::Thay đổi thông tin cá nhân - $user - vietducco.com::."; }
		if($b=="showcart"){
			echo ".::Thông tin giỏ hàng - vietducco.com::."; }	
		if($b=="gh"){
			echo ".::Thông tin giỏ hàng - vietducco.com::."; }	
		if($b=="tk"){
			echo ".::Kết quả tìm kiếm - vietducco.com::."; }						
		if($b=="listcart"){
			echo ".::Giỏ hàng của Quý khách - vietducco.com::."; }							
			
		$sql="select sanpham.*,loaisanpham.* from sanpham,loaisanpham where sanpham.id_loai=loaisanpham.id_loai";
		$kq=mysql_query($sql);
		while($r=mysql_fetch_array($kq))
		{
			$idsp=$r["id"];$tensp=$r["tensp"];$tenloai=$r["tenloaisp"];
			if($b=="ct"&&$id==$idsp)
				echo ".::".$tensp." - ".$tenloai." - vietducco.com::." ;			
		}		
		$kq2=mysql_query("select * from nhomsanpham");
		while($r2=mysql_fetch_array($kq2))
		{
			$idnhom=$r2["id_nhom"];	$tennhom=$r2["tennhom"];
			//echo "$tennhom";
			if($b=="nsp"&&$idn==$idnhom)
				echo ".:: $tennhom - vietducco.com::.";			
		}		
		
		$kq3=mysql_query("select * from nhomsanpham,loaisanpham where nhomsanpham.id_nhom=loaisanpham.id_nhom");
		while($r3=mysql_fetch_array($kq3))
		{
			$idloai=$r3["id_loai"];	$tenloai=$r3["tenloaisp"];$tennhom=$r3["tennhom"];
			//echo "$tenloai";
			if($b=="lsp"&&$idl==$idloai)
				echo ".::$tennhom - $tenloai - vietducco.com::.";			
		}				
		
		$kq4=mysql_query("select * from menu");
		while($r4=mysql_fetch_array($kq4))
		{
			$id_menu=$r4["id_menu"];	$tenmenu=$r4["tenmenu"];
			//echo "$tenmenu";
			if($b=="m"&&$idm==$id_menu)
				echo ".::$tenmenu - vietducco.com::.";			
		}
		
		$sql5="select sanpham.*,menu.* from sanpham,menu where sanpham.id_menu=menu.id_menu";
		$kq5=mysql_query($sql5);
		while($r5=mysql_fetch_array($kq5))
		{
			$idsp5=$r5["id"];$tensp5=$r5["tensp"];$tenmenu5=$r5["tenmenu"];
			if($b=="ctm"&&$id==$idsp5)
				echo ".::".$tensp5." - ".$tenmenu5." - vietducco.com::." ;			
		}
	}	
	
	else{
		echo ".::Công ty Cổ Phần Sản Xuất Nội Thất & Xây Dựng Việt Đức - vietducco.com::.";
	}
	
?>
</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script language="JavaScript" type="text/JavaScript" src="quanly.js"></script>
<script language="JavaScript" type="text/JavaScript" src="Scripts/kt-trinhduyet.js"></script>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="ajax.js"></script>
<script language=javascript src='Scripts/tinnoibat.js'></script>

</head>

<body>
<script type="text/javascript" src="Scripts/tooltip/wz_tooltip.js"></script> 
<script type="text/javascript" src="Scripts/tooltip/tip_balloon.js"></script> 
<script type="text/javascript" src="Scripts/tooltip/tip_centerwindow.js"></script> 
<script type="text/javascript" src="Scripts/tooltip/tip_followscroll.js"></script>
<div id="container">
	<div id="header">
	  <?php include "include/header.php";?>
  </div>
    <div id="menu-ngang">      
	 <?php include "menu-top.php"; ?>   
    </div>
	<div id="sologan">
	<?php include "include/sologan.php";?>
	</div>	                         
        
    <div id="main">
    	<div id="content-left">
        <?php include "include/menu-left-or.php";?>        
        <div style="height:5px"></div>
        <?php
        if(isset($_SESSION["success"])){
            include "include/login_success.php";
        }
        else
            include "include/login.php";
        ?>
        <div style="height:5px"></div>
        <?php include "include/menu-giohang.php"; ?>	
        <div style="height:5px"></div>       
		<?php include "include/luottruycap.php"; ?>
        <div style="height:5px"></div>       	  
   		<?php include "include/download.php"; ?>
        <div style="height:5px"></div>       	
        <?php include "include/hotro.php"; ?> 	
        </div>
        <div id="content-right">
        <?php include "timkiem.php"; ?>		
        <div style="height:5px"></div>               	 	
        <?php include "include/phone.php"; ?>    
        <div style="height:5px"></div>     	
        <?php include "include/khuyenmai.php"; ?>        
        <div style="height:5px"></div>	       
   		<?php include "include/sp-noibat.php"; ?>           	         	  
        </div>
        <div id="content">
		<?php
		$file="include/content.php";
		//$file="include/cont.php";
		if(isset($_REQUEST["b"]))
		{
			$b=$_REQUEST["b"];
			if($b=="download-cataloge")
				$file="include/download-cataloge.php";
			if($b=="gioithieu")
				$file="include/gioithieu.php";
			if($b=="lienhe")
				$file="include/lienhe.php";				
			if($b=="huongdanmuahang")
				$file="include/huongdanmuahang.php";
			if($b=="ct")
				$file="include/chitiet.php";
			if($b=="ctm")
				$file="include/chitiet-menu.php";	
			if($b=="nsp")
				$file="include/nhomsp.php";
			if($b=="lsp")
				$file="include/loaisp.php";
			if($b=="tk")
				$file="include/result.php";
			if($b=="dk")
				$file="include/register.php";
			if($b=="cpw")
				$file="include/change-pw.php";
			if($b=="rpw")
				$file="include/reset-pw.php";
			if($b=="showcart")
				$file="include/showcart.php";
			if($b=="gh")
				$file="include/giohang.php";				
			if($b=="pay")
				$file="include/thanhtoan.php";	
			if($b=="listcart")
				$file="include/cart.php";
			if($b=="m")
				$file="include/noidung-menu.php";
			if($b=="bds")
				$file="include/batdongsan.php";		
			if($b=="kd")
				$file="include/kieudan.php";		
			if($b=="md")
				$file="include/mau-day.php";						
			if($b=="khtt")
				$file="include/khtt.php";	
			if($b=="ttcn")
				$file="include/thongtincanhan.php";					
			if($b=="change")
				$file="include/change.php";									
		}
		include "$file";
		
		?>
        </div>
    </div>
</div>
<div id="footer">
<?php include "include/footer.php"; ?>   
</div>
</body>
</html>